﻿// JScript 文件
//Creator:JackyLee;Time:16:40 2007-7-19
function RTransportLine(lineId,lineName,lineDirection,transportType,cityId){
	this.toString=function(){
		return 'RTransportLine';
	}
	if(lineId){
		this.lineId=lineId;
	}else{
		this.lineId=-1;
	}
	if(lineName){
		this.lineName=lineName;
	}else{
		this.lineName='';
	}
	if(lineDirection){
		this.lineDirection=lineDirection;
	}else{
		this.lineDirection='';
	}
	if(transportType){
		this.transportType=transportType;
	}else{
		this.transportType=0;
	}
	if(cityId){
		this.cityId=cityId;
	}else{
		this.cityId=-1;
	}
	
	this.startStation='';
	this.endStation='';
	this.stationCount=0;
	this.ticketPrice=0;
	this.cityName='';
	
	this.getTransportType=function(){
		switch(this.transportType){
			case 1:
			case '1':
				return '公交';
			break;
			case 2:
			case '2':
				return '地铁';
			break;
			case 3:
			case '3':
				return '长途汽车';
			break;
			case 4:
			case '4':
				return '火车';
			break;
			case 5:
			case '5':
				return '飞机';
			break;
			case 6:
			case '6':
				return '轮船';
			break;
			default:
				return '未知';
			break;
		}
	}
	
	this.getLineDirection=function(){
		switch(this.lineDirection){
			case 1:
			case '1':
				return '上行';
			break;
			case 2:
			case '2':
				return '下行';
			break;
			case 3:
			case '3':
				return '环线';
			break;
			default:
				return '未知';
			break;
		}
	}
	
	this.getLineDetailUrl=function(){
		switch(this.transportType){
			case 1:
			case '1':
				return '/POIInfo/BusLineInfo.aspx?lid='+this.lineId+'&cid='+this.cityId;
			break;
			case 2:
			case '2':
				return '/POIInfo/SubwayLineInfo.aspx?lid='+this.lineId+'&cid='+this.cityId;
			break;
			case 3:
			case '3':
				return '#';
			break;
			case 4:
			case '4':
				return '#';
			break;
			case 5:
			case '5':
				return '#';
			break;
			case 6:
			case '6':
				return '#';
			break;
			default:
				return '#';
			break;
		}
	}
	
}
